// import * as constants from './constants'
// Immutable对象不可被变更
// fromJS可以帮我们把JS对象转换成Immutable对象
import {fromJS} from "immutable";
import * as constants from './constants';

const defaultState = fromJS({
    login:false
});
export default (state = defaultState, action) => {
    switch (action.type) {
        case constants.CHANGE_LOGIN:
            return state.set('login',action.value);
        case constants.SIGN_OUT:
            return state.set('login',action.value);
        default:
            return state;
    }
}
